#!/bin/bash
# @see https://github.com/docker/hub-feedback/issues/1261#issuecomment-441126749 Support automated ARM builds
# @see https://github.com/balena-io/qemu/releases

set -eux

# downloads a local copy of qemu on docker-hub build machines
curl -sfL https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-aarch64.tar.gz | tar zxvf - -C .
cp qemu-3.0.0+resin-aarch64/qemu-aarch64-static ../../../../rootfilesystem/usr/bin/.
rm -rf qemu-3.0.0+resin-aarch64
